mirror of
https://github.com/FAUSheppy/jeffrey_miller_flask_ftp
synced 2025-12-07 08:21:36 +01:00
add service setup to setupscript
This commit is contained in:
@@ -6,7 +6,7 @@ After=network.target
|
|||||||
WorkingDirectory=/home/flask/jeffrey_miller_flask_ftp/
|
WorkingDirectory=/home/flask/jeffrey_miller_flask_ftp/
|
||||||
Type=simple
|
Type=simple
|
||||||
User=flask
|
User=flask
|
||||||
ExecStart=/usr/bin/waitress-serve --host 127.0.0.1 --port 5014 --call 'app:createApp'
|
ExecStart=/usr/bin/waitress-serve --host 0.0.0.0 --port 5000 --call 'app:createApp'
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
7
setup.sh
7
setup.sh
@@ -27,3 +27,10 @@ ssh -t ${TARGET} "${CMD_RESTART_FTP}"
|
|||||||
|
|
||||||
CMD_LOCK_SSH="echo 'AllowUsers root' >> /etc/ssh/sshd_config"
|
CMD_LOCK_SSH="echo 'AllowUsers root' >> /etc/ssh/sshd_config"
|
||||||
ssh -t ${TARGET} "${CMD_LOCK_SSH}"
|
ssh -t ${TARGET} "${CMD_LOCK_SSH}"
|
||||||
|
|
||||||
|
CMD_CP_SERVICE="cp /home/flask/jeffrey_miller_flask_ftp/flask-ftp.service /etc/systemd/user/"
|
||||||
|
CMD_ENABLE_SERVICE="systemctl enable /etc/systemd/user/flask-ftp.service"
|
||||||
|
CMD_START_SERVICE="systemctl start flask-ftp.service"
|
||||||
|
ssh -t ${TARGET} "${CMD_CP_SERVICE}"
|
||||||
|
ssh -t ${TARGET} "${CMD_ENABLE_SERVICE}"
|
||||||
|
ssh -t ${TARGET} "${CMD_START_SERVICE}"
|
||||||
|
|||||||
Reference in New Issue
Block a user