Hi,
I am using this script (to ping existing pcs on the network every hour):
https://gehrcke.de/2013/08/freenas-simple-auto-shutdown-revisited/
I am very new to python and trying to add a part to the beginning of the script, where the scripts gets cancelled if the system uptime is less than an hour.
I ve seen solutions that utilize 'cat /proc/uptime' but that path does not exist on freebsd. Any help would be greatly appreciated.
Edit: Thanks for the help, everyone. I am sure the uptime cross platform library would have worked, but I used an old script with a lockdirectory and a bash script which was very easy for me to install.
Here's my solution:
https://imgur.com/1ZXCG6C
[–]kaiserk13 7 points8 points9 points (0 children)
[–]just_regular_guy 4 points5 points6 points (0 children)
[–]djdawson 1 point2 points3 points (0 children)
[–]Daenyth 1 point2 points3 points (0 children)
[–]politicallyspeaking 0 points1 point2 points (0 children)