Last active
February 11, 2017 09:00
-
-
Save fredrike/fa5f79000ca5c858b0f1ab7cdee7f6bf to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
$TARGET = $1 | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
cd /var/packages | |
for F in *; do sudo ${F}/scripts/start-stop-status stop; done | |
for F in *; do ls -l ${F}/target; sudo ln -sf /${TARGET}/\@appstore/${F} /var/packages/${F}/target; ls -l ${F}/target; done | |
cd /usr/local | |
for F in *; do if [ -h ${F} ]; then ls -l ${F}; sudo ln -sf /${TARGET}/\@appstore/${F} ${F}; ls -l ${F}; fi; done | |
cd /var/packages | |
for F in *; do sudo ${F}/scripts/start-stop-status start; done | |
IFS=$SAVEIFS | |
sudo vi /usr/syno/etc/synobackup.conf -c ":%s/volume1/${TARGET}/g" -c '":wq" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment