Skip to content
Ken Lee Shu Ming edited this page Aug 3, 2015 · 1 revision

Welcome to the SOCPrint wiki!

Bash script to duplicate this web to your server Recommended script location /var/www

# Script to clone github repo
SAVE_DIR="html2"
GIT_DIR="https://github.com/KenLSM/SOCPrint.git"
if [ -d $SAVE_DIR ]; then
        echo Directory $SAVE_DIR exist, removing it? "(y/n)"
        read word
        if [ $word == "y" ]; then
                rm $SAVE_DIR -r
                echo $SAVE_DIR removed
        fi
else
echo Directory $SAVE_DIR not found
fi
cp html $SAVE_DIR -r
echo Save backup to $SAVE_DIR
rm html -r
echo Remove html folder
git clone $GIT_DIR temp

# Copy html folder
cp temp/html html -r
# Copy .htpass
cp temp/.htpass .htpass
rm temp -r
echo Cloned git dir into html 
chmod 777 html/uploads
echo Changed access permission of uploads folder to 777
Clone this wiki locally