56 lines
1.3 KiB
Bash
56 lines
1.3 KiB
Bash
#!/bin/sh
|
|
# postinst script for sclesignrestfulmisc
|
|
#
|
|
# see: dh_installdeb(1)
|
|
|
|
set -e
|
|
user="root"
|
|
|
|
# dh_installdeb will replace this with shell code automatically
|
|
# generated by other debhelper scripts.
|
|
|
|
#DEBHELPER#
|
|
|
|
userpi="pi"
|
|
|
|
# Restart service
|
|
# RSYSLOG
|
|
ret=$(/usr/bin/systemctl is-enabled rsyslog.service)
|
|
if [ "$ret" = "disabled" ]; then
|
|
/usr/bin/systemctl enable rsyslog.service
|
|
fi
|
|
/usr/bin/systemctl restart rsyslog.service
|
|
|
|
# LOGROTATE
|
|
if [ -f "/etc/cron.daily/logrotate" ]; then
|
|
/usr/bin/rm -rf /etc/cron.daily/logrotate
|
|
fi
|
|
|
|
ret=$(/usr/bin/systemctl is-enabled logrotate.service)
|
|
if [ "$ret" = "disabled" ]; then
|
|
/usr/bin/systemctl enable logrotate.service
|
|
fi
|
|
/usr/bin/systemctl restart logrotate.service
|
|
|
|
# DHCPCD
|
|
ret=$(/usr/bin/systemctl is-enabled dhcpcd.service)
|
|
if [ "$ret" = "disabled" ]; then
|
|
/usr/bin/systemctl enable dhcpcd.service
|
|
fi
|
|
/usr/bin/systemctl restart dhcpcd.service
|
|
|
|
# DNSMASQ
|
|
ret=$(/usr/bin/systemctl is-enabled dnsmasq.service)
|
|
if [ "$ret" = "disabled" ]; then
|
|
/usr/bin/systemctl enable dnsmasq.service
|
|
fi
|
|
/usr/bin/systemctl restart dnsmasq.service
|
|
|
|
# HOSTAPD
|
|
/usr/bin/systemctl unmask hostapd.service
|
|
ret=$(/usr/bin/systemctl is-enabled hostapd.service)
|
|
if [ "$ret" = "disabled" ]; then
|
|
/usr/bin/systemctl enable hostapd.service
|
|
fi
|
|
/usr/bin/systemctl restart hostapd.service
|