Last active
June 19, 2019 10:12
-
-
Save spajak/e6434ce86bc126b9b5399dfae0dfdf9d to your computer and use it in GitHub Desktop.
Bootstrap Entware-ng on Synology DS
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/bash | |
# Script installs Entware-ng (https://github.com/Entware/Entware-ng) | |
# on Synology DSM 6.2 under /opt directory. | |
# Must be run with sudo. Can be used as a scheduled task on system boot. | |
printf -- "---------------------------\n" | |
printf -- "| Installing Entware-ng.. |\n" | |
printf -- "---------------------------\n" | |
DEVICE="/volume1/@Entware-ng/opt" | |
DIR="/opt" | |
if mount | grep -qF "on $DIR type"; then | |
printf "Directory \"%s\" already mounted.\n" "$DIR" | |
else | |
mkdir -p "$DIR" | |
mount -v -o bind,rw "$DEVICE" "$DIR" | |
sh "$DIR/etc/init.d/rc.unslung" start | |
fi | |
printf -- "Done\n" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment