Commit 3c9f7ac9 authored by Dietmar Maurer's avatar Dietmar Maurer

avoid shell scripts in service definitions

parent 2d2c2994
......@@ -5,8 +5,9 @@ Requires=pve-cluster.service
After=pve-cluster.service
[Service]
ExecStart=/etc/init.d/pvedaemon start
ExecStop=/etc/init.d/pvedaemon stop
ExecStart=/usr/bin/pvedaemon start
ExecStop=/usr/bin/pvedaemon stop
ExecReload=/usr/bin/pvedaemon restart
Type=forking
[Install]
......
......@@ -7,8 +7,9 @@ After=pve-cluster.service
After=pvedaemon.service
[Service]
ExecStart=/etc/init.d/pveproxy start
ExecStop=/etc/init.d/pveproxy stop
ExecStart=/usr/bin/pveproxy start
ExecStop=/usr/bin/pveproxy stop
ExecReload=/usr/bin/pveproxy restart
Type=forking
[Install]
......
......@@ -5,8 +5,9 @@ Requires=pve-cluster.service
After=pve-cluster.service
[Service]
ExecStart=/etc/init.d/pvestatd start
ExecStop=/etc/init.d/pvestatd stop
ExecStart=/usr/bin/pvestatd start
ExecStop=/usr/bin/pvestatd stop
ExecReload=/usr/bin/pvestatd restart
Type=forking
[Install]
......
......@@ -5,8 +5,9 @@ Wants=pveproxy.service
After=pveproxy.service
[Service]
ExecStart=/etc/init.d/spiceproxy start
ExecStop=/etc/init.d/spiceproxy stop
ExecStart=/usr/bin/spiceproxy start
ExecStop=/usr/bin/spiceproxy stop
ExecReload=/usr/bin/spiceproxy restart
Type=forking
[Install]
......
......@@ -48,6 +48,12 @@ my %daemon_options = (
pidfile => '/var/run/pveproxy/pveproxy.pid',
);
my $rundir="/var/run/pveproxy";
mkdir($rundir, 0700);
my $gid = getgrnam('www-data') || die "getgrnam failed - $!\n";
my $uid = getpwnam('www-data') || die "getpwnam failed - $!\n";
chown($uid, $gid, $rundir);
my $daemon = __PACKAGE__->new('pveproxy', $cmdline, %daemon_options);
sub add_dirs {
......
......@@ -26,10 +26,10 @@ case "$1" in
test -f /etc/pve/local/pve-ssl.pem || exit 0;
test -e /proxmox_install_mode && exit 0;
deb-systemd-invoke restart pvedaemon.service
deb-systemd-invoke restart pvestatd.service
deb-systemd-invoke restart pveproxy.service
deb-systemd-invoke restart spiceproxy.service
deb-systemd-invoke reload pvedaemon.service
deb-systemd-invoke reload pvestatd.service
deb-systemd-invoke reload pveproxy.service
deb-systemd-invoke reload spiceproxy.service
exit 0;;
......@@ -83,7 +83,7 @@ case "$1" in
if test ! -e /proxmox_install_mode; then
for service in pvedaemon pveproxy spiceproxy pvestatd; do
deb-systemd-invoke restart $service
deb-systemd-invoke reload $service
done
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment