phantomjs

CentOS7: 04-PhantomJS systemd Service Wrapper

  • systemd makes simple services so much easier to deal with

 

Create phantomjs.service

touch /etc/systemd/system/phantomjs

 

[setup@c7 ~]$ cd /etc/systemd
[setup@c7 systemd]$ ls
bootchart.conf  coredump.conf  journald.conf  logind.conf  system  system.conf  user  user.conf
[setup@c7 systemd]$ cd system


[setup@c7 system]$ sudo touch phantomjs.service
[sudo] password for setup:

 

CentOS7: 04-PhantomJS Service Wrapper

 

 


create phantomjs service script

/etc/init.d/phantomjs

[setup@c7 ~]$ cd /etc
[setup@c7 etc]$ cd init.d
[setup@c7 init.d]$ ls
functions  netconsole  network  README
[setup@c7 init.d]$ touch phantomjs
touch: cannot touch ‘phantomjs’: Permission denied
[setup@c7 init.d]$ sudo touch phantomjs

sudo chmod +x phantomjs

 

 


create phantomjs config script

/etc/default/phantomjs

Subscribe to phantomjs