TachiWeb-Server
TachiWeb-Server copied to clipboard
Run TachiWeb-Server on startup
Hey, is it possible to make the application start on startup?
If yes how would i do it? I tried creating a tachi.service file which contained this: [Unit] Description= TachiWeb-Server After=network.target
[Service] Type=simple User=tachi Group=tachi ExecStart=/usr/bin/java -jar /path/to/TachiServer-all-1.0.jar
[Install] WantedBy=default.target
On startup, the application started, but nothing would load. It stated that the library failed to load, the catalogues also didnt load.
The simplest method would be to just use the crontab, if you are on Debian/Ubuntu you can use the commands below to do this:
- Ensure you have cron installed:
sudo apt-get install cron. - Add the tachi user account if you haven't done so already:
sudo adduser tachi. Use whatever password you want when asked to enter one. - Log into the tachi user:
su tachi. - Download TachiWeb-Server onto the new user account:
cd ~ && wget https://ci.nulldev.xyz/job/TachiWeb-Server/lastSuccessfulBuild/artifact/TachiServer/build/libs/TachiServer-all-1.0.jar - Open the crontab:
crontab -e. Choosenanoas the editor if you are asked. - Add the following line to the bottom:
@reboot cd /home/tachi && /usr/bin/java -jar TachiServer-all-1.0.jar
- Save your changes and close nano: Press
Ctrl+X, pressYand then pressENTER. - Reboot and see if you can access the program.
The user and group tag in the systemd service file need to be created, alternatively use "nobudy" and make sure that the jar is executable by others. (i.e. chmod 111) @Flat