Skip to content

Commit

Permalink
install-legacy: fix systemd unit and daemon-reload (#12)
Browse files Browse the repository at this point in the history
* install-legacy: add systemctl daemon-reload

Systemd needs daemon-reload to take the new unit into consideration

* install-legacy.sh: fix systemd unit

[environment] doesn't exist

* install-legacy.sh: fix daemon-reload line
  • Loading branch information
luclu7 authored Jan 8, 2024
1 parent 8af6273 commit 5a5c06b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions install-legacy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,25 @@ cat <<EOF
[Unit]
Description=UTDON - Application for tracking obsolete FOSS applications
After=networking.service
[environment]
USER_ENCRYPT_SECRET=$USER_ENCRYPT_SECRET
DATABASE_ENCRYPT_SECRET=$DATABASE_ENCRYPT_SECRET
[Service]
WorkingDirectory=$installdir
ExecStart=node main.js
User=$service
Group=$service
Environment="USER_ENCRYPT_SECRET=$USER_ENCRYPT_SECRET"
Environment="DATABASE_ENCRYPT_SECRET=$DATABASE_ENCRYPT_SECRET"
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=$service
Restart=always
[Install]
WantedBy=multi-user.target
EOF

echo ""
echo ""
# you have to daemon-reload for systemd to recognize the new unit
echo "First, reload systemd: 'systemctl daemon-reload', then"
echo "Start service: 'systemctl start $service'"
echo ""
echo "################"

0 comments on commit 5a5c06b

Please sign in to comment.