2020-07-06 03:09:26 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
configure)
|
2020-07-06 04:53:55 +00:00
|
|
|
echo "#!/bin/sh
|
|
|
|
ssh -o StrictHostKeyChecking=no root@127.0.1.1 '/mnt/data/on_boot.sh'" > /etc/init.d/udm.sh
|
2020-07-06 03:09:26 +00:00
|
|
|
chmod +x /etc/init.d/udm.sh
|
|
|
|
echo "[Unit]
|
|
|
|
Description=Run On Startup UDM
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
ExecStart=/etc/init.d/udm.sh
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target" > /etc/systemd/system/udmboot.service
|
|
|
|
systemctl enable udmboot
|
|
|
|
systemctl start udmboot
|
|
|
|
;;
|
|
|
|
|
|
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|