Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152#!/usr/bin/env fish
# Get the current user's usernameset username (whoami)
# Ensure the required directories existmkdir -p ~/.config/systemd/user
# Create the service fileecho "[Unit]Description=Aesthetic Daemon Service
[Service]ExecStart=/usr/bin/node /home/$username/aesthetic-computer/daemon/daemon.jsRestart=alwaysEnvironment=NODE_ENV=productionEnvironment=PATH=/home/linuxbrew/.linuxbrew/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binWorkingDirectory=/home/$username/aesthetic-computer/daemon/ExecReload=/bin/kill -HUP \$MAINPID
[Install]WantedBy=default.target" > ~/.config/systemd/user/aesthetic-daemon.service
# Create the path unit fileecho "[Unit]Description=Watch aesthetic daemon.js for changes
[Path]PathChanged=/home/$username/aesthetic-computer/daemon/daemon.js
[Install]WantedBy=default.target" > ~/.config/systemd/user/aesthetic-daemon.path
# Reload the systemd manager configurationsystemctl --user daemon-reload
# Ensure the script has execute permissionschmod +x /home/$username/aesthetic-computer/ssl-dev/ssl-install.fish
# Enable the service and the path unitsystemctl --user enable aesthetic-daemon.servicesystemctl --user enable aesthetic-daemon.path
# Start the service and the path unitsystemctl --user start aesthetic-daemon.servicesystemctl --user start aesthetic-daemon.path
# Restart the service if it is already runningsystemctl --user restart aesthetic-daemon.service
echo "😈 Aesthetic Daemon systemd service installed and started successfully!"