Also it could be that launchd closes the tasks you started in your script when it reaches its end.I had issues running fswatch, so I had to replace fswatch by /usr/local/bin/fswatch complement any executable name by its full path.Mac OS X Hints has outlined some uses for the app. It may be a way to make the AppleScript samba fix a bit more 'integrated' and hidden. Its a command line type app so its a bit esoteric to install. If your script does not run after entering the commands above: There is an app called SleepWatcher and it can be configured to run scripts when the mac sleeps and wakes. You can check if it is loaded with the command by entering: Launchctl unload ~/Library/LaunchAgents/.plist This tells launchd to load the task and will run it immediately. Launchctl load ~/Library/LaunchAgents/.plist Now place .plist in ~/Library/LaunchAgents and run in terminal: /Users/philipp/Documents/Backups/SURSERV/backup_all.shNext think of a name in the following reverse domain notation .plist and create the property list file (.plist) with the following content: Mai 2018įirst of all create your bash script and place it somewhere. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.Veröffentlicht von philipp am 14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Note: it currently only works on IPv4 addresses. On Mac you can alternatively download the excellent SleepWatcherĪnd make it run any time you computer wakes from sleep. On Windows, you can set up a Scheduled Task with the same command. The minimal /.sleep script can look like this (we only need to be sure it passes as a shell script) /bin/bash exit 0 In /. */5 * * * * update-dreamhost-dns -api_key YOUR_DH_API_KEY -domain brew install sleepwatcher By default, it expects two scripts: /.sleep to run before the computer goes to sleep, and /.wakeup to run after it wakes up. Runs the script every 5 minutes: # Minute Hour Day of Month Month Day of Week Command Run it once to make sure it works: update-dreamhost-dns -api_key YOUR_DH_API_KEY -domain Īssuming that went well, set it in a cronjob and forget about it. Now get a DreamHost API key with "All dns functions" from It uses the dreamhost package to connect to DreamHost's APIįirst install it globally npm install -global node-dreamhost-dns-updater Turning DreamHost into a dynamic DNS provider - similar This is a simple script to keep a domain or subdomain always pointing to your current IP, basically
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |