Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
radio_mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
azbyka
radio_mpd
Commits
76e3111a
Commit
76e3111a
authored
Mar 14, 2024
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add services_creator.sh
parent
1f5d9aab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
services_creator.sh
services_creator.sh
+20
-0
No files found.
services_creator.sh
0 → 100755
View file @
76e3111a
#!/bin/bash
cd
/home/icecastradio/radio_mpd
listdir
=
`
ls
-d
*
/ |
sed
's|/||'
`
echo
"
$ABS_PATH_TO_CFG
"
for
i
in
$listdir
;
do
ABS_PATH_TO_CFG
=
/home/icecastradio/radio_mpd/
$i
.mpd.conf
echo
"
$ABS_PATH_TO_CFG
"
echo
"
$i
"
cp
/home/icecastradio/radio_mpd/template.service /etc/systemd/system/
$i
.service
sed
-i
's|#1|'
$ABS_PATH_TO_CFG
'|'
/etc/systemd/system/
$i
.service
systemctl daemon-reload
serv
$i
on
#serv enable /etc/systemd/system/$i.service
done
mkdir
/var/log/checkmpd/
echo
"*/4 * * * * root cd /home/icecastradio/radio_mpd/ && ./checkmpd >> /var/log/checkmpd/access.log 2>&1"
>
/etc/cron.d/checkmpd
serv crond on
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment