vi /etc/systemd/system/myscript.service
Create a file in /etc/systemd/system and add the following lines.
---------------------------------------------
[Unit]
Description=cifs start script
[Service]
ExecStart=/usr/bin/docker-volume-netshare cifs
Restart=always
[Install]
WantedBy=multi-user.target
---------------------------------------------
Then execute following commands.
sudo systemctl daemon-reload
sudo systemctl enable myscript.service
sudo systemctl start myscript.service
No comments:
Post a Comment