Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
madek-broadcaster
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
birk
madek-broadcaster
Commits
e194f37a
Commit
e194f37a
authored
7 years ago
by
birk
Browse files
Options
Downloads
Patches
Plain Diff
added player check via cronjob
parent
fa742773
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+20
-1
20 additions, 1 deletion
README.md
service/service_check.sh
+8
-0
8 additions, 0 deletions
service/service_check.sh
with
28 additions
and
1 deletion
README.md
+
20
−
1
View file @
e194f37a
...
...
@@ -17,6 +17,12 @@ sudo apt-get install unattended-upgrades
setxkbmap ch
```
Enable automtic security update.
```
bash
sudo
dpkg-reconfigure unattended-upgrades
```
Install necessary software.
```
bash
...
...
@@ -69,4 +75,17 @@ This ensures that the player software starts automatically after startup and pos
Create directory
`~/.config/systemd/user`
and copy
`service/player.service`
there.
Enable the service:
`systemctl --user enable player.service`
Reload the daemon:
`sudo systemctl daemon-reload`
And restart the service:
`sudo systemctl restart player.service`
\ No newline at end of file
And restart the service:
`sudo systemctl restart player.service`
## Defining cronjobs to supervise the player and to delete the log file weekly
Via
`crontab -e`
add:
```
bash
SHELL
=
/bin/bash
USER
=
itz
*
*
*
*
*
/home/itz/madek-broadcaster/service/service_check.sh
0 0
*
*
1
rm
/home/itz/log
```
This diff is collapsed.
Click to expand it.
service/service_check.sh
0 → 100644
+
8
−
0
View file @
e194f37a
#!/bin/sh
age
=
$(
stat
-c
%Y ~/player_log/last_media_entry.txt
)
now
=
$(
date
+
"%s"
)
age
=
$((
now
-
age
))
if
[
"
$age
"
-gt
300
]
;
then
/home/itz/madek-broadcaster/service/service_restart.sh
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment