forked from moosefs/moosefs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebian_sysv_to_systemd.sh
executable file
·33 lines (25 loc) · 1.31 KB
/
debian_sysv_to_systemd.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
cat debian/control | sed 's/^Build-Depends: /Build-Depends: dh-systemd | debhelper (>= 10.0), /' > debian/control_systemd
mv debian/control_systemd debian/control
rm -f debian/*.init debian/*.default
#cat debian/rules | sed 's/dh_installinit/cp systemd\/*.service debian\
# dh_installinit\
# dh_systemd_start --no-start --no-restart-on-upgrade/' > debian/rules_systemd
#mv debian/rules_systemd debian/rules
#echo "
#override_dh_installsystemd:
# dh_installsystemd --no-start --no-restart-on-upgrade
#"
echo "
override_dh_systemd_start:
dh_systemd_start --no-start --no-restart-on-upgrade
" >> debian/rules
cp debian/systemd_extra/* debian/
systemdunitdir=`pkg-config --variable=systemdsystemunitdir systemd`
echo "${systemdunitdir}/[email protected]" >> debian/moosefs-master.install
echo "${systemdunitdir}/[email protected]" >> debian/moosefs-chunkserver.install
echo "${systemdunitdir}/[email protected]" >> debian/moosefs-metalogger.install
echo "${systemdunitdir}/moosefs-cgiserv.service" >> debian/moosefs-cgiserv.install
echo "${systemdunitdir}/moosefs-master.service" >> debian/moosefs-master.install
echo "${systemdunitdir}/moosefs-chunkserver.service" >> debian/moosefs-chunkserver.install
echo "${systemdunitdir}/moosefs-metalogger.service" >> debian/moosefs-metalogger.install