Script Editor - Apple script starting terminal and running bash script.
Hello
I have a little "Apple script" made in script editor.
This app has an icon on my desktop.
The app has the following code :
with timeout of 60 seconds
tell application "Terminal"
activate
set currentTab to do script ("sudo /bin/bash /Users/tormod/Scripts/startup.sh && exit")
end tell
end timeout
And when pressed, the app runs a script called startup.sh
startup.sh har the following code :
#!/usr/bin/env bash
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users:/Users/root:/Users/root/Scripts:/Library/Scripts:/Library/Scripts/Startup
#Load modules for Fuse
/Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse
/usr/sbin/sysctl -w vfs.generic.osxfuse.tunables.allow_other=1
#Connect to rsync_net
/bin/sleep 30
/usr/local/bin/sshfs XXXX@XXXXX.ch-s011.rsync.net: /mnt/sshfs -oauto_cache,reconnect,local,volname=rsync_net,allow_other,defer_permissions
When I start the small apple script, it will open terminal and run the startup.sh .
Startup.sh will ask for the password for the user logged in.
How can the script be run, without the script asking for password ?
I would like the script to run without any password promt.