3 # fixes the cakelampvm permissions according to the way.
7 if [[ $EUID != 0 ]]; then
8 echo "This script must be run as root or sudo."
14 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory.
15 export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )"
18 source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"
22 # fix up the main web storage.
23 chown -R www-data:www-data /var/www
24 test_or_die "chown www-data"
26 test_or_die "group_perm www-data"
30 # set up access on some important folders for the developer user.
31 chown -R developer:developer /home/developer
32 test_or_die "chown developer home"
33 harsh_perm /home/developer/.ssh
34 test_or_die "harsh_perm setting on developer .ssh"
35 chown -R developer:developer /etc/apache2 /etc/bind
36 test_or_die "chown apache2 and bind to developer"
37 group_perm /etc/apache2 /etc/bind
38 test_or_die "group perms on apache2 and bind"
42 # fix perms for fred user.
43 chown -R fred:fred /home/fred /home/archives/stuffing
44 test_or_die "chown fred home"
45 harsh_perm /home/fred/.ssh
46 test_or_die "harsh_perm setting on fred .ssh"
47 chown -R fred:fred /opt/feistymeow.org
48 test_or_die "chown feisty meow to fred"
49 group_perm /opt/feistymeow.org
50 test_or_die "group perms on feisty meow"
54 # some slightly tricky bits start here. we want to massage the vm into the
55 # best possible shape without needing to re-release it.
59 # only update hello if they've still got the file there. we don't want to
60 # keep forcing our hellos at people.
61 if [ -f "$HOME/hello.txt" ]; then
62 # copy the most recent hello file into place for the user.
63 \cp -f "$FEISTY_MEOW_APEX/production/sites/cakelampvm.com/hello.txt" "$HOME"
64 test_or_continue "copying hello file for user"
69 # install a better editor app.
72 The script is about to install the bluefish editor and some dependencies.
73 If the app is not already installed, then this process takes only about a
74 minute on a slower home DSL internet connection...
78 apt-get install -y bluefish &> "/tmp/install_bluefish-$(logname).log"
79 test_or_continue "failed to install bluefish editor. not good."
85 # deploy the site updater here to fix the local cakelampvm.com site...
90 # sequel--tell them they're great and show the hello again also.
97 Thanks for revamping your cakelampvm. :-)