I’m stupid in code
Can you help me to write a script in ini.d to run on autostart syncthing? My path for syncthing.app is mnt/ext1/applications/synchting.app and bin’s file path is mnt/ext1/applications/syncthing/syncthing(bin).
ChatGPT gives me this
#!/bin/sh
#
# /mnt/ext1/system/etc/init.d/S99autostart
#
case "$1" in
start)
echo "Starting syncthing"
/mnt/ext1/applications/syncthing/syncthing -no-browser -home="/mnt/ext1/applications/syncthing" &
;;
stop)
echo "Stopping syncthing"
killall syncthing
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0
Last edited by Uppy; 06-05-2024 at 11:31 AM.
|