yum update Tworzenie skryptów autostart
Create the file (touch>chmod>edit seems recommended, I don't known why):
touch /etc/systemd/system/activefolder.service chmod 664 /etc/systemd/system/activefolder.service vim /etc/systemd/system/activefolder.service  
/etc/systemd/system/activefolder.service example: [Unit]
Description=activefolder After=network.target
[Service] WorkingDirectory=/var/www/activefolder/current ExecStart=/var/www/activefolder/current/script/delayed_job start Type=forking
PIDFile=/run/activefolder.pid Environment="RAILS_ENV=production" #User=httpd #Group=httpd  [Install]
WantedBy=default.target
Then:
systemctl daemon-reload systemctl start name.service LUB $ crontab -e
 
 Run a script called /home/vivek/bin/installnetkit.sh
 @reboot       /home/vivek/bin/installnetkit.sh Start crond automatically at boot time
You also need to enable crond service via sys v / BSD init style system. Under RHEL / CentOS / Fedora, you need to use chkconfig (ntsysv) command to enable crond on boot:
# chkconfig crond on
 ## Commands to start/stop/restart crond ###
 # service crond restart
 # service crond start
 # service crond stopRejestracja i subskrypcjasubscription-manager register --username admin-example --password secret --auto-attach
 Network nmcli con mod net-eth0 connection.autoconnect yes
 
Brak komentarzy:
Prześlij komentarz