21 lines
594 B
Bash
21 lines
594 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
IS_OPNSENSE=$(cat /etc/shells | grep opnsense-shell)
|
|
|
|
if [ ! -z $IS_OPNSENSE ]; then
|
|
echo "copy action conf"
|
|
cp ./actions_netcup_ddns.conf /usr/local/opnsense/service/conf/actions.d/actions_netcup_ddns.conf
|
|
echo "reload action config"
|
|
service configd restart
|
|
echo "copy update script to bin folder"
|
|
cp ./update_netcup_ddns.sh /usr/local/bin/update_netcup_ddns.sh
|
|
echo "make script executable"
|
|
chmod +x /usr/local/bin/update_netcup_ddns.sh
|
|
echo "install done"
|
|
else
|
|
echo "Could not detect OPNsense environment! Exiting doing nothing!"
|
|
exit 1
|
|
fi
|