add service setup to setupscript

This commit is contained in:
Yannik Schmidt
2021-08-31 21:52:13 +02:00
parent f27bca31a8
commit 044a7f97fe
2 changed files with 8 additions and 1 deletions

View File

@@ -27,3 +27,10 @@ ssh -t ${TARGET} "${CMD_RESTART_FTP}"
CMD_LOCK_SSH="echo 'AllowUsers root' >> /etc/ssh/sshd_config"
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}"