diff --git a/conf/mautrix-whatsapp.service b/conf/mautrix-whatsapp.service deleted file mode 100644 index 417e8c1..0000000 --- a/conf/mautrix-whatsapp.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Matrix Whatsapp bridge -After=matrix-synapse.service - -[Service] -Type=simple -User=__APP__ -WorkingDirectory=/opt/yunohost/__APP__ -ExecStart=/opt/yunohost/__APP__/mautrix-whatsapp -c=/opt/yunohost/__APP__/config.yaml >> /var/log/__APP__/__APP__.log 2>&1 -Restart=always -RestartSec=3 - -[Install] -WantedBy=multi-user.target diff --git a/conf/systemd.service b/conf/systemd.service index 76cdf64..417e8c1 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,13 +1,14 @@ [Unit] -Description=Small description of the service -After=network.target +Description=Matrix Whatsapp bridge +After=matrix-synapse.service [Service] Type=simple User=__APP__ -Group=__APP__ -WorkingDirectory=__FINALPATH__/ -ExecStart=__FINALPATH__/script >> /var/log/__APP__/__APP__.log 2>&1 +WorkingDirectory=/opt/yunohost/__APP__ +ExecStart=/opt/yunohost/__APP__/mautrix-whatsapp -c=/opt/yunohost/__APP__/config.yaml >> /var/log/__APP__/__APP__.log 2>&1 +Restart=always +RestartSec=3 [Install] WantedBy=multi-user.target diff --git a/scripts/install b/scripts/install index ed38f15..b87b071 100755 --- a/scripts/install +++ b/scripts/install @@ -208,7 +208,7 @@ ynh_script_progression --message="Configuring a systemd service..." --time --wei # Create systemd config for mautrix-whatsapp #cp ../conf/default_mautrix-whatsapp /etc/default/$app -ynh_add_systemd_config --service=$app --template=mautrix-whatsapp.service +ynh_add_systemd_config --service=$app #================================================= # SPECIFIC SETUP