From 115d0bc7529a664f96c042bb16d826109d1305c4 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 22 Feb 2025 22:42:37 +0100 Subject: [PATCH] service, readme --- README.md | 22 ++++++++++++++++++++++ routeros_backup.service | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 README.md create mode 100644 routeros_backup.service diff --git a/README.md b/README.md new file mode 100644 index 0000000..d93708d --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ + +# RouterOS backup system + +1. Instalation: + - clone (to ex. /opt/routeros_backup) + - create venv + - install requirements via pip + - copy systemd service (routeros_backup.service) + +2. Start + - systemctl start routeros_backup.service + - go to http://:81 + +3. Register, Login + +4. Configure devices, keys, backups + +5. Done + +## Authors + +- [@linuxiarz.pl] diff --git a/routeros_backup.service b/routeros_backup.service new file mode 100644 index 0000000..9b07e3c --- /dev/null +++ b/routeros_backup.service @@ -0,0 +1,18 @@ +[Unit] +Description=RouterOS Backup Application +After=network.target + +[Service] +#User=www-data # Zmień na odpowiedniego użytkownika +#Group=www-data +WorkingDirectory=/opt/routeros_backup +Environment="PATH=/opt/hosts_app/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" +Environment="FLASK_APP=app.py" +Environment="FLASK_ENV=production" +ExecStart=/opt/routeros_backup/venv/bin/gunicorn -c /opt/routeros_backup/gunicorn_config.py --worker-class gevent --keep-alive 10 app:app + +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target