diff --git a/scripts/web.sh b/scripts/web.sh index 149bf027..9ee69c57 100755 --- a/scripts/web.sh +++ b/scripts/web.sh @@ -21,10 +21,17 @@ mkdir -p $STORAGE_ROOT/www/static cp conf/www_default.html $STORAGE_ROOT/www/static/index.html chown -R $STORAGE_USER $STORAGE_ROOT/www/static/index.html +# Create an init script to start the PHP FastCGI daemon and keep it +# running after a reboot. Allows us to serve Roundcube for webmail. +rm -f /etc/init.d/php-fastcgi +ln -s $(pwd)/conf/phpfcgi-initscript /etc/init.d/php-fastcgi +update-rc.d php-fastcgi defaults + +# Start services. service nginx restart +service php-fastcgi restart -conf/php-fcgid start - +# Open ports. ufw allow http ufw allow https diff --git a/scripts/webmail.sh b/scripts/webmail.sh index 9fb82e2f..8b25894d 100755 --- a/scripts/webmail.sh +++ b/scripts/webmail.sh @@ -51,10 +51,3 @@ cat - > /etc/roundcube/debian-db.php <