hackerspace-adelaide / association

A repo to track issues (things to do) for the group as a whole.
0 stars 0 forks source link

why didn't fail2ban, apache2, mysql, postfix restart? #12

Closed thatpixguy closed 7 years ago

thatpixguy commented 7 years ago

I had some manually modified service files, eg:

# ls /usr/local/lib/systemd/system
apache2.service`  fail2ban.service  mysql.service  postfix.service

i'm not sure they are still being used

thatpixguy commented 7 years ago

added them to multi-user.target.wants:

root@slartibartfast:/etc/systemd/system/multi-user.target.wants# cp -s /usr/local/lib/systemd/system/* .

thatpixguy commented 7 years ago

problem was that i was overriding the automatic generation of systemd services from the init scripts (which i guess also handles starting the newly created services) with the native service files in /usr/local/lib/systemd/system, but i hadn't done the work to make those services automatically start at boot (the symlinking into a .wants directory)

got the symlink info from: https://www.digitalocean.com/community/tutorials/how-to-configure-a-linux-service-to-start-automatically-after-a-crash-or-reboot-part-1-practical-examples