summarylogtreecommitdiffstats
path: root/autorestartNM.install
blob: be89827b735333e607cbdf38f0d1a4d4903de353 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
post_install() {
        cp /etc/conf.d/autorestartNM.sample.conf /etc/conf.d/autorestartNM.conf

	systemctl daemon-reload
	systemctl enable timer-variable.timer
	systemctl start timer-variable.timer
	
	echo '------------------------------------------------------------------------'
	echo 'Please edit /etc/conf.d/autorestartNM.conf to your needs.'
	echo 'The autorestartNM service will fail till you do so.'
	echo '------------------------------------------------------------------------'	
}

post_upgrade() {
	systemctl daemon-reload
	systemctl restart timer-variable.timer
}

post_remove() {
	systemctl disable timer-variable.timer
	systemctl stop timer-variable.timer
	systemctl daemon-reload
}