Created
August 26, 2015 14:36
-
-
Save miziomon/30ac244d7e9327329442 to your computer and use it in GitHub Desktop.
Post Domain modification script for Virtualmin. (create a symlink from /home/public_html to virtualbox shared folder)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$VIRTUALSERVER_ACTION" = "CREATE_DOMAIN" ]; then | |
#printenv > /tempenv | |
usermod -G vboxsf $VIRTUALSERVER_USER | |
mkdir /media/sf_web/$VIRTUALSERVER_USER | |
touch /media/sf_web/$VIRTUALSERVER_USER/index.html | |
echo $VIRTUALSERVER_DOM > /media/sf_web/$VIRTUALSERVER_USER/index.html | |
rm -r $VIRTUALSERVER_HOME/public_html | |
ln -s /media/sf_web/$VIRTUALSERVER_USER $VIRTUALSERVER_HOME/public_html | |
# cd $VIRTUALSERVER_HOME | |
# wget -O somefile.tar.gz "http://yourdomain.com/somefile.tar.gz" | |
# chown $VIRTUALSERVER_USER:$VIRTUALSERVER_GROUP somefile.tar.gz | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment