Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

start scipt at startup ubuntu

Create a systemd unit file with .service extension in /etc/systemd/system, 
for example creating:

sudo nano /etc/systemd/system/my-service.service

, with the following content:


[Unit]
Description=My custom startup script

[Service]
ExecStart=/home/user/startup.sh start

[Install]
WantedBy=multi-user.target


You can now start/stop this service with:

sudo systemctl start my-service / sudo systemctl stop my-service

To enable this service when startup, run:

sudo systemctl enable my-service

To disable this service when startup, run:

sudo systemctl disable my-service
Comment

PREVIOUS NEXT
Code Example
Shell :: install apache2 
Shell :: your repository has no remotes configured to push to 
Shell :: kubectl port-forward 
Shell :: How to stop a service with systemctl command 
Shell :: pull unmerged branch 
Shell :: instal maven in mac brew 
Shell :: apache install 
Shell :: open file explorer from cmd 
Shell :: push to existing repo github 
Shell :: install helm on minikube 
Shell :: setting up path in zsh 
Shell :: bash store script output in variable 
Shell :: error: refs/remotes/origin/PLAT-4366 does not point to a valid object! 
Shell :: composer php 
Shell :: ERROR: No matching distribution found for torch.fx 
Shell :: how to install mvnw 
Shell :: lxml parser 
Shell :: top command 
Shell :: compare two files shell script 
Shell :: warning: LF will be replaced by CRLF in [file_path] 
Shell :: wget a file from bitbucket 
Shell :: linux how to write to file 
Shell :: dconf command not found 
Shell :: update composer 
Shell :: pull remote branch git 
Shell :: solana mint one nft 
Shell :: step to install vue project in visual studio code 
Shell :: the ycmd server install 
Shell :: pull from dev branch to master 
Shell :: restart fstab ununtu 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =