To set a bitnami wordpress application to start on boot, you just need to make sure that systemctl can use the ctlscript. To do that:
1. Locate the installation directory of your bitnami wordpress. If you are following the default setting, the location should be in /opt
2. Locate the ctlscript.sh file, which is the script to start, stop and restart bitnami-application.
$ sudo find / -iname "ctlscript.sh" -type f
/opt/bitnami-wordpress-5.6-0/ctlscript.sh
3. Copy the script to /etc/init.d, and rename it to bitnami-wordpress
$ sudo cp /opt/bitnami-wordpress-5.6-0/ctlscript.sh /etc/init.t/bitnami-wordpress
4. Edit the script, and add "INIT INFO" settings below #!/bin/sh to ensure systemd can understand the script
#!/bin/sh
### BEGIN INIT INFO
# Provides: bitnami-wordpress
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable services provided by daemon.
### END INIT INFO
No comments:
Post a Comment