Open Jeff-Tian opened 8 years ago
Same experience here. Worked on a 16.04 ununtu machine for me
16.04 uses systemd so it is easy to get this working. 14.04 still uses upstart so you must use put it in a different place:
nano fake_service /etc/init.d/fake_service
chmod 755 /etc/init.d/fake_service
and use a different command to stop and start it:
service fake_service [start/stop]
@rosscournoyer602 you are right. However there are errors when issuing service fake2.service start
with the following content in the /etc/init.d/fake2.service which is on the pdf lab mannual:
[Unit]
Description=fake2
After=network.target
[Service]
ExecStart=/bin/echo I am starting the fake2 service
ExecStop=/bin/echo I am stopping the fake2 service
[Install]
WantedBy=multi-user.target
The error is like:
/etc/init.d/fake2.service: 1: /etc/init.d/fake2.service: [Unit]: not found
by command
systemctl
can't be found and can't be installed bysudo apt-get install systemctl
.https://lms.360training.com/scorm/linuxfoundation/LFS201/Lab%204.2.pdf