Updates
This commit is contained in:
25
shell/2-InstallService.sh
Executable file
25
shell/2-InstallService.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
./Prepare.sh
|
||||
cd ..
|
||||
|
||||
ServiceName=$(python3 Scripts.py --getconfig PROGNAME)
|
||||
SHMName=$(python3 Scripts.py --getconfig SHMNAME)
|
||||
|
||||
echo '[Unit]
|
||||
Description=Запуск '$ServiceName'
|
||||
|
||||
[Service]
|
||||
ExecStart='$PWD'/shell/Gunicorn.sh
|
||||
User='$USER'
|
||||
Group='$USER'
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
|
||||
' > /tmp/site_$SHMName.service
|
||||
|
||||
#echo "Устанавливаем сервис для пользователя $FNAME"
|
||||
sudo cp /tmp/site_$SHMName.service /etc/systemd/system/site_$SHMName.service
|
||||
sudo systemctl enable site_$SHMName.service
|
||||
sudo systemctl restart site_$SHMName.service
|
||||
Reference in New Issue
Block a user