Skip to content

Instantly share code, notes, and snippets.

@spajak
Last active June 19, 2019 10:12
Show Gist options
  • Save spajak/e6434ce86bc126b9b5399dfae0dfdf9d to your computer and use it in GitHub Desktop.
Save spajak/e6434ce86bc126b9b5399dfae0dfdf9d to your computer and use it in GitHub Desktop.
Bootstrap Entware-ng on Synology DS
#!/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