14 lines
355 B
Python
14 lines
355 B
Python
import config
|
|
import powershell
|
|
import os
|
|
|
|
deploy_path = config.deploy_path
|
|
pm2_name = config.pm2_name
|
|
|
|
if os.path.isdir(deploy_path):
|
|
powershell.run_command_no_dir('pm2 restart ' + pm2_name + ' --no-treekill')
|
|
powershell.run_command_no_dir('pm2 reset ' + pm2_name)
|
|
print('\nPackage restarted\n')
|
|
else:
|
|
print('\nPackage not installed.\n')
|