restart services
This commit is contained in:
parent
0a39624d4d
commit
879b0d05a0
|
@ -376,8 +376,12 @@ CADDY_EOF
|
||||||
$sudo_cmd chown -R root:root $PREFIX/etc/tmpfiles.d/caddy.conf
|
$sudo_cmd chown -R root:root $PREFIX/etc/tmpfiles.d/caddy.conf
|
||||||
$sudo_cmd chmod 644 $PREFIX/etc/tmpfiles.d/caddy.conf
|
$sudo_cmd chmod 644 $PREFIX/etc/tmpfiles.d/caddy.conf
|
||||||
|
|
||||||
|
$sudo_cmd systemctl stop caddy.service >/dev/null 2>/dev/null
|
||||||
$sudo_cmd systemctl daemon-reload
|
$sudo_cmd systemctl daemon-reload
|
||||||
$sudo_cmd systemctl start caddy.service
|
$sudo_cmd systemctl start caddy.service
|
||||||
|
|
||||||
|
echo "caddy started with systemctl"
|
||||||
|
|
||||||
elif [ -d "/Library/LaunchAgents" ]; then
|
elif [ -d "/Library/LaunchAgents" ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "Installing as launchd service"
|
echo "Installing as launchd service"
|
||||||
|
@ -387,7 +391,11 @@ CADDY_EOF
|
||||||
$sudo_cmd mv $PREFIX/tmp/$caddy_dir/com.caddyserver.web.plist /Library/LaunchAgents/com.caddyserver.web.plist
|
$sudo_cmd mv $PREFIX/tmp/$caddy_dir/com.caddyserver.web.plist /Library/LaunchAgents/com.caddyserver.web.plist
|
||||||
$sudo_cmd chown root:wheel /Library/LaunchAgents/com.caddyserver.web.plist
|
$sudo_cmd chown root:wheel /Library/LaunchAgents/com.caddyserver.web.plist
|
||||||
$sudo_cmd chmod 0644 /Library/LaunchAgents/com.caddyserver.web.plist
|
$sudo_cmd chmod 0644 /Library/LaunchAgents/com.caddyserver.web.plist
|
||||||
|
$sudo_cmd launchctl unload -w /Library/LaunchAgents/com.caddyserver.web.plist >/dev/null 2>/dev/null
|
||||||
$sudo_cmd launchctl load -w /Library/LaunchAgents/com.caddyserver.web.plist
|
$sudo_cmd launchctl load -w /Library/LaunchAgents/com.caddyserver.web.plist
|
||||||
|
|
||||||
|
echo "caddy started with launchd"
|
||||||
|
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "Unknown system service init type. You must install as a system service manually."
|
echo "Unknown system service init type. You must install as a system service manually."
|
||||||
|
|
Loading…
Reference in New Issue