File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 64
64
65
65
#END
66
66
67
+ For Centos 7
68
+ https://www.writebash.com/advanced-tutorial/make-bash-script-run-as-a-service-in-centos-7-259.html
67
69
68
70
71
+ [Unit]
72
+ Description=Getload service - WriteBash demo service in CentOS 7.x
73
+ After=network.target
74
+
75
+ [Service]
76
+ Type=simple
77
+ PIDFile=/var/run/getload.pid
78
+ ExecStart=/bin/sh -c "/opt/getload.sh >>/var/log/getload.log 2>&1"
79
+ TimeoutStartSec=0
80
+ Restart=on-failure
81
+
82
+ [Install]
83
+ WantedBy=default.target
84
+
85
+
86
+ ########################
87
+
88
+ jira example
89
+
90
+ [Unit]
91
+ Description=Jira Service By Muhammad Asim
92
+ After=network.target
93
+ StartLimitIntervalSec=0
94
+
95
+ [Service]
96
+ Type=simple
97
+ PIDFile=/var/run/getload.pid
98
+ ExecStart=/bin/sh -c "/root/bash/while.sh"
99
+ TimeoutStartSec=0
100
+ Restart=on-failure
101
+
102
+ [Install]
103
+ WantedBy=multi-user.target
69
104
You can’t perform that action at this time.
0 commit comments