diff --git a/index.js b/index.js index 1385c62..d1f333c 100644 --- a/index.js +++ b/index.js @@ -131,5 +131,11 @@ app.post('/upload', function (req, res) { } }); + try { + require('child_process').spawn('sudo', ['systemctl', 'restart', 'video-player2.service']); + } catch (error) { + console.error(error); + } + res.redirect('/'); }); \ No newline at end of file