Hmm @AcidRain, leider habe ich mich ein wenig zu früh gefreut.
Nach nem Reboot läuft das Powersave-Skript sauber durch.
Code
=======================================
2017-10-15 05:47:47 => starting powersave script...
=======================================
2017-10-15 05:47:47 => beginning loop. recording status: 1
2017-10-15 05:47:47 => setting shutdown timer
2017-10-15 05:47:47 => beginning loop. shutdown timer: 10
2017-10-15 05:48:47 => checking active users
2017-10-15 05:48:47 => checking smbstatus
2017-10-15 05:48:47 => checking active clients
2017-10-15 05:49:03 => beginning loop. shutdown timer: 9
2017-10-15 05:49:03 => checking subscription status: 1
2017-10-15 05:50:03 => checking subscription status: 1
2017-10-15 05:51:03 => checking subscription status: 1
2017-10-15 05:52:03 => checking subscription status: 1
2017-10-15 05:53:03 => checking subscription status: 1
2017-10-15 05:54:03 => checking subscription status: 1
2017-10-15 05:55:03 => subscription active, set shutdown timer to: 10 min
2017-10-15 05:56:03 => checking active users
2017-10-15 05:56:03 => checking smbstatus
2017-10-15 05:56:03 => checking active clients
2017-10-15 05:56:18 => beginning loop. shutdown timer: 10
2017-10-15 05:57:18 => checking active users
2017-10-15 05:57:18 => checking smbstatus
2017-10-15 05:57:18 => checking active clients
2017-10-15 05:57:33 => beginning loop. shutdown timer: 9
2017-10-15 05:57:33 => checking subscription status: 1
2017-10-15 05:58:34 => checking subscription status: 1
2017-10-15 05:59:34 => checking subscription status: 1
2017-10-15 06:00:34 => checking subscription status: 1
2017-10-15 06:01:34 => checking subscription status: 1
2017-10-15 06:02:34 => checking subscription status: 1
2017-10-15 06:03:34 => checking subscription status: 1
2017-10-15 06:04:34 => checking subscription status: 1
2017-10-15 06:05:34 => checking subscription status: 1
2017-10-15 06:06:34 => checking subscription status: 1
2017-10-15 06:07:34 => checking subscription status: 1
2017-10-15 06:08:34 => checking subscription status: 1
2017-10-15 06:09:34 => checking subscription status: 1
2017-10-15 06:10:34 => checking subscription status: 1
2017-10-15 06:11:34 => checking subscription status: 1
2017-10-15 06:12:34 => checking subscription status: 1
2017-10-15 06:13:34 => checking subscription status: 1
2017-10-15 06:14:34 => checking subscription status: 1
2017-10-15 06:15:34 => checking subscription status: 1
2017-10-15 06:16:34 => checking subscription status: 1
2017-10-15 06:17:34 => checking subscription status: 1
2017-10-15 06:18:34 => checking subscription status: 1
2017-10-15 06:19:34 => checking subscription status: 1
2017-10-15 06:20:34 => subscription active, set shutdown timer to: 10 min
2017-10-15 06:21:34 => checking active users
2017-10-15 06:21:34 => users active, set shutdown timer to: 10 min
2017-10-15 06:21:34 => checking smbstatus
2017-10-15 06:21:34 => checking active clients
2017-10-15 06:21:49 => beginning loop. shutdown timer: 10
2017-10-15 06:22:49 => checking active users
2017-10-15 06:22:49 => users active, set shutdown timer to: 10 min
2017-10-15 06:22:49 => checking smbstatus
2017-10-15 06:22:49 => checking active clients
2017-10-15 06:23:05 => beginning loop. shutdown timer: 10
2017-10-15 06:24:05 => checking active users
2017-10-15 06:24:05 => users active, set shutdown timer to: 10 min
2017-10-15 06:24:05 => checking smbstatus
2017-10-15 06:24:05 => checking active clients
2017-10-15 06:24:20 => beginning loop. shutdown timer: 10
2017-10-15 06:25:20 => checking active users
2017-10-15 06:25:20 => users active, set shutdown timer to: 10 min
2017-10-15 06:25:20 => checking smbstatus
2017-10-15 06:25:20 => checking active clients
2017-10-15 06:25:35 => beginning loop. shutdown timer: 10
2017-10-15 06:26:35 => checking active users
2017-10-15 06:26:35 => users active, set shutdown timer to: 10 min
2017-10-15 06:26:36 => checking smbstatus
2017-10-15 06:26:36 => checking active clients
2017-10-15 06:26:51 => beginning loop. shutdown timer: 10
2017-10-15 06:27:51 => checking active users
2017-10-15 06:27:51 => users active, set shutdown timer to: 10 min
2017-10-15 06:27:51 => checking smbstatus
2017-10-15 06:27:51 => checking active clients
2017-10-15 06:28:06 => beginning loop. shutdown timer: 10
2017-10-15 06:29:06 => checking active users
2017-10-15 06:29:06 => users active, set shutdown timer to: 10 min
2017-10-15 06:29:06 => checking smbstatus
2017-10-15 06:29:06 => checking active clients
2017-10-15 06:29:22 => beginning loop. shutdown timer: 10
2017-10-15 06:30:22 => checking active users
2017-10-15 06:30:22 => users active, set shutdown timer to: 10 min
2017-10-15 06:30:22 => checking smbstatus
2017-10-15 06:30:22 => checking active clients
2017-10-15 06:30:37 => beginning loop. shutdown timer: 10
2017-10-15 06:31:37 => checking active users
2017-10-15 06:31:37 => users active, set shutdown timer to: 10 min
2017-10-15 06:31:37 => checking smbstatus
2017-10-15 06:31:37 => checking active clients
2017-10-15 06:31:53 => beginning loop. shutdown timer: 10
2017-10-15 06:32:53 => checking active users
2017-10-15 06:32:53 => users active, set shutdown timer to: 10 min
2017-10-15 06:32:53 => checking smbstatus
2017-10-15 06:32:53 => checking active clients
2017-10-15 06:33:08 => beginning loop. shutdown timer: 10
2017-10-15 06:34:08 => checking active users
2017-10-15 06:34:08 => users active, set shutdown timer to: 10 min
2017-10-15 06:34:08 => checking smbstatus
2017-10-15 06:34:08 => checking active clients
2017-10-15 06:34:23 => beginning loop. shutdown timer: 10
2017-10-15 06:35:23 => checking active users
2017-10-15 06:35:23 => users active, set shutdown timer to: 10 min
2017-10-15 06:35:23 => checking smbstatus
2017-10-15 06:35:23 => checking active clients
2017-10-15 06:35:39 => beginning loop. shutdown timer: 10
2017-10-15 06:36:39 => checking active users
2017-10-15 06:36:39 => users active, set shutdown timer to: 10 min
2017-10-15 06:36:39 => checking smbstatus
2017-10-15 06:36:39 => checking active clients
2017-10-15 06:36:54 => beginning loop. shutdown timer: 10
2017-10-15 06:37:54 => checking active users
2017-10-15 06:37:54 => users active, set shutdown timer to: 10 min
2017-10-15 06:37:54 => checking smbstatus
2017-10-15 06:37:54 => checking active clients
2017-10-15 06:38:10 => beginning loop. shutdown timer: 10
2017-10-15 06:39:10 => checking active users
2017-10-15 06:39:10 => users active, set shutdown timer to: 10 min
2017-10-15 06:39:10 => checking smbstatus
2017-10-15 06:39:10 => checking active clients
2017-10-15 06:39:25 => beginning loop. shutdown timer: 10
2017-10-15 06:40:25 => checking active users
2017-10-15 06:40:25 => users active, set shutdown timer to: 10 min
2017-10-15 06:40:25 => checking smbstatus
2017-10-15 06:40:25 => checking active clients
2017-10-15 06:40:40 => beginning loop. shutdown timer: 10
2017-10-15 06:41:40 => checking active users
2017-10-15 06:41:40 => users active, set shutdown timer to: 10 min
2017-10-15 06:41:40 => checking smbstatus
2017-10-15 06:41:41 => checking active clients
2017-10-15 06:41:56 => beginning loop. shutdown timer: 10
2017-10-15 06:42:56 => checking active users
2017-10-15 06:42:56 => users active, set shutdown timer to: 10 min
2017-10-15 06:42:56 => checking smbstatus
2017-10-15 06:42:56 => checking active clients
2017-10-15 06:43:11 => beginning loop. shutdown timer: 10
2017-10-15 06:44:11 => checking active users
2017-10-15 06:44:11 => users active, set shutdown timer to: 10 min
2017-10-15 06:44:11 => checking smbstatus
2017-10-15 06:44:11 => checking active clients
2017-10-15 06:44:27 => beginning loop. shutdown timer: 10
2017-10-15 06:45:27 => checking active users
2017-10-15 06:45:27 => users active, set shutdown timer to: 10 min
2017-10-15 06:45:27 => checking smbstatus
2017-10-15 06:45:27 => checking active clients
2017-10-15 06:45:42 => beginning loop. shutdown timer: 10
2017-10-15 06:46:42 => checking active users
2017-10-15 06:46:42 => users active, set shutdown timer to: 10 min
2017-10-15 06:46:42 => checking smbstatus
2017-10-15 06:46:42 => checking active clients
2017-10-15 06:46:58 => beginning loop. shutdown timer: 10
2017-10-15 06:47:58 => checking active users
2017-10-15 06:47:58 => users active, set shutdown timer to: 10 min
2017-10-15 06:47:58 => checking smbstatus
2017-10-15 06:47:58 => checking active clients
2017-10-15 06:48:13 => beginning loop. shutdown timer: 10
2017-10-15 06:49:13 => checking active users
2017-10-15 06:49:13 => users active, set shutdown timer to: 10 min
2017-10-15 06:49:13 => checking smbstatus
2017-10-15 06:49:13 => checking active clients
2017-10-15 06:49:28 => beginning loop. shutdown timer: 10
2017-10-15 06:50:28 => checking active users
2017-10-15 06:50:28 => users active, set shutdown timer to: 10 min
2017-10-15 06:50:28 => checking smbstatus
2017-10-15 06:50:28 => checking active clients
2017-10-15 06:50:44 => beginning loop. shutdown timer: 10
2017-10-15 06:51:44 => checking active users
2017-10-15 06:51:44 => users active, set shutdown timer to: 10 min
2017-10-15 06:51:44 => checking smbstatus
2017-10-15 06:51:44 => checking active clients
2017-10-15 06:51:59 => beginning loop. shutdown timer: 10
2017-10-15 06:52:59 => checking active users
2017-10-15 06:52:59 => users active, set shutdown timer to: 10 min
2017-10-15 06:52:59 => checking smbstatus
2017-10-15 06:52:59 => checking active clients
2017-10-15 06:53:14 => beginning loop. shutdown timer: 10
2017-10-15 06:54:14 => checking active users
2017-10-15 06:54:15 => checking smbstatus
2017-10-15 06:54:15 => checking active clients
2017-10-15 06:54:30 => beginning loop. shutdown timer: 9
2017-10-15 06:55:30 => checking active users
2017-10-15 06:55:30 => checking smbstatus
2017-10-15 06:55:30 => checking active clients
2017-10-15 06:55:45 => beginning loop. shutdown timer: 8
2017-10-15 06:56:45 => checking active users
2017-10-15 06:56:45 => checking smbstatus
2017-10-15 06:56:45 => checking active clients
2017-10-15 06:57:01 => beginning loop. shutdown timer: 7
2017-10-15 06:58:01 => checking active users
2017-10-15 06:58:01 => checking smbstatus
2017-10-15 06:58:01 => checking active clients
2017-10-15 06:58:16 => beginning loop. shutdown timer: 6
2017-10-15 06:59:16 => checking active users
2017-10-15 06:59:16 => checking smbstatus
2017-10-15 06:59:16 => checking active clients
2017-10-15 06:59:32 => beginning loop. shutdown timer: 5
2017-10-15 07:00:32 => checking active users
2017-10-15 07:00:32 => checking smbstatus
2017-10-15 07:00:32 => checking active clients
2017-10-15 07:00:47 => beginning loop. shutdown timer: 4
2017-10-15 07:01:47 => checking active users
2017-10-15 07:01:47 => checking smbstatus
2017-10-15 07:01:47 => checking active clients
2017-10-15 07:02:02 => beginning loop. shutdown timer: 3
2017-10-15 07:03:02 => checking active users
2017-10-15 07:03:02 => checking smbstatus
2017-10-15 07:03:02 => checking active clients
2017-10-15 07:03:18 => beginning loop. shutdown timer: 2
2017-10-15 07:04:18 => checking active users
2017-10-15 07:04:18 => checking smbstatus
2017-10-15 07:04:18 => checking active clients
2017-10-15 07:04:33 => beginning loop. shutdown timer: 1
2017-10-15 07:05:33 => checking active users
2017-10-15 07:05:33 => checking smbstatus
2017-10-15 07:05:33 => checking active clients
2017-10-15 07:05:49 => getting next recording
2017-10-15 07:05:49 => wake_after_secs: 129600
2017-10-15 07:05:49 => setting wake up time: 1508173249 (2017-10-16 19:00:49)
2017-10-15 07:05:49 => shutting down / standby (use_standby: yes)
Alles anzeigen
Aber nach dem Aufwachen aus dem Standby bleibts immer bei "checking subscription status: 1" stehen.
Code
=======================================
2017-10-15 07:32:45 => starting powersave script...
=======================================
2017-10-15 07:32:45 => beginning loop. recording status: 1
2017-10-15 07:32:45 => setting shutdown timer
2017-10-15 07:32:45 => beginning loop. shutdown timer: 10
2017-10-15 07:33:45 => checking active users
2017-10-15 07:33:45 => users active, set shutdown timer to: 10 min
2017-10-15 07:33:45 => checking smbstatus
2017-10-15 07:33:45 => checking active clients
2017-10-15 07:34:00 => beginning loop. shutdown timer: 10
2017-10-15 07:34:00 => checking subscription status: 1
Alles anzeigen
Hat jemand eine Idee? Muss ich irgendwo noch ein sleep setzen?
Wenn ich in der Crontab das Skript z.B. alle 5 Minuten ausführen lasse funktionierts, nur hab ich dann das Skript ja dann mehrfach am laufen.
EDIT: So, ich lasse jetzt das Skript per cron alle 10 Minutne starten und prüfe mit pid ob der Prozess bereits läuft. Das scheint zu funktionieren.