Skip to content

Commit 004bf98

Browse files
committed
wip
1 parent 012b6ce commit 004bf98

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

webdav.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ public function start() {
120120
$this->setup( $key );
121121
}
122122

123-
// Reload nginx
123+
// Restart nginx
124124
global $hcpp;
125-
$cmd = '(service nginx reload) > /dev/null 2>&1 &';
125+
$cmd = '(service nginx restart) > /dev/null 2>&1 &';
126126
$cmd = $hcpp->do_action( 'webdav_nginx_reload', $cmd );
127127
shell_exec( $cmd );
128128
}
@@ -145,6 +145,12 @@ public function stop() {
145145
global $hcpp;
146146
$hcpp->log( "Killed rclone webdav process $pid" );
147147
}
148+
149+
// Remove service link and reload nginx
150+
global $hcpp;
151+
$cmd = '(rm -f /etc/nginx/conf.d/domains/webdav-* ; service nginx restart) > /dev/null 2>&1 &';
152+
$cmd = $hcpp->do_action( 'webdav_nginx_restart', $cmd );
153+
shell_exec( $cmd );
148154
}
149155

150156
// Setup WebDAV services for user.
@@ -238,10 +244,6 @@ public function priv_delete_user( $args ) {
238244
if ( is_link( $link ) ) {
239245
unlink( $link );
240246
}
241-
$link = "/etc/apache2/conf.d/domains/webdav-$user.$domain.conf";
242-
if ( is_link( $link ) ) {
243-
unlink( $link );
244-
}
245247

246248
// Delete user port
247249
$hcpp->delete_port( 'webdav', $user );

0 commit comments

Comments
 (0)