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 ...@@ -5,8 +5,9 @@ Requires=pve-cluster.service
After=pve-cluster.service After=pve-cluster.service
[Service] [Service]
ExecStart=/etc/init.d/pvedaemon start ExecStart=/usr/bin/pvedaemon start
ExecStop=/etc/init.d/pvedaemon stop ExecStop=/usr/bin/pvedaemon stop
ExecReload=/usr/bin/pvedaemon restart
Type=forking Type=forking
[Install] [Install]
......
...@@ -7,8 +7,9 @@ After=pve-cluster.service ...@@ -7,8 +7,9 @@ After=pve-cluster.service
After=pvedaemon.service After=pvedaemon.service
[Service] [Service]
ExecStart=/etc/init.d/pveproxy start ExecStart=/usr/bin/pveproxy start
ExecStop=/etc/init.d/pveproxy stop ExecStop=/usr/bin/pveproxy stop
ExecReload=/usr/bin/pveproxy restart
Type=forking Type=forking
[Install] [Install]
......
...@@ -5,8 +5,9 @@ Requires=pve-cluster.service ...@@ -5,8 +5,9 @@ Requires=pve-cluster.service
After=pve-cluster.service After=pve-cluster.service
[Service] [Service]
ExecStart=/etc/init.d/pvestatd start ExecStart=/usr/bin/pvestatd start
ExecStop=/etc/init.d/pvestatd stop ExecStop=/usr/bin/pvestatd stop
ExecReload=/usr/bin/pvestatd restart
Type=forking Type=forking
[Install] [Install]
......
...@@ -5,8 +5,9 @@ Wants=pveproxy.service ...@@ -5,8 +5,9 @@ Wants=pveproxy.service
After=pveproxy.service After=pveproxy.service
[Service] [Service]
ExecStart=/etc/init.d/spiceproxy start ExecStart=/usr/bin/spiceproxy start
ExecStop=/etc/init.d/spiceproxy stop ExecStop=/usr/bin/spiceproxy stop
ExecReload=/usr/bin/spiceproxy restart
Type=forking Type=forking
[Install] [Install]
......
...@@ -48,6 +48,12 @@ my %daemon_options = ( ...@@ -48,6 +48,12 @@ my %daemon_options = (
pidfile => '/var/run/pveproxy/pveproxy.pid', 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); my $daemon = __PACKAGE__->new('pveproxy', $cmdline, %daemon_options);
sub add_dirs { sub add_dirs {
......
...@@ -26,10 +26,10 @@ case "$1" in ...@@ -26,10 +26,10 @@ case "$1" in
test -f /etc/pve/local/pve-ssl.pem || exit 0; test -f /etc/pve/local/pve-ssl.pem || exit 0;
test -e /proxmox_install_mode && exit 0; test -e /proxmox_install_mode && exit 0;
deb-systemd-invoke restart pvedaemon.service deb-systemd-invoke reload pvedaemon.service
deb-systemd-invoke restart pvestatd.service deb-systemd-invoke reload pvestatd.service
deb-systemd-invoke restart pveproxy.service deb-systemd-invoke reload pveproxy.service
deb-systemd-invoke restart spiceproxy.service deb-systemd-invoke reload spiceproxy.service
exit 0;; exit 0;;
...@@ -83,7 +83,7 @@ case "$1" in ...@@ -83,7 +83,7 @@ case "$1" in
if test ! -e /proxmox_install_mode; then if test ! -e /proxmox_install_mode; then
for service in pvedaemon pveproxy spiceproxy pvestatd; do for service in pvedaemon pveproxy spiceproxy pvestatd; do
deb-systemd-invoke restart $service deb-systemd-invoke reload $service
done done
fi 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