yar229 / WebDavMailRuCloud

WebDAV cloud.mail.ru ...& Yandex.Disk | WebDAV Облако Mail.Ru Сетевой Диск
MIT License
478 stars 56 forks source link

[not-a-bug] Autostart in Linux #214

Open castorsky opened 3 years ago

castorsky commented 3 years ago

All major distros are now based on systemd and users can create their own services which start on user logon. Assume that mono is already installed and mono-version is unpacked to /home/${USER}/.local/bin/webdav/ directory. User have to create systemd directory

mkdir -p ~/.config/systemd/user

Then place there wrappermailru.service file with following content

[Unit]
Description=WedDAV Mail.ru wrapper service
After=network.target

[Service]
ExecStart=mono /home/${USER}/.local/bin/webdav/wdmrc.exe -p 9092 --maxthreads 8

[Install]
WantedBy=default.target

Reload systed config:

systemctl --user daemon-reload

And finally enable service:

systemctl --user enable --now wrappermailru.service
yar229 commented 3 years ago
[Unit]
Description=WedDAV Mail.ru wrapper service
After=network.target
castorsky commented 3 years ago

Thanks, updated.