Article 51G4K autorun script

autorun script

by
kodirucu
from LinuxQuestions.org on (#51G4K)
Hello. I can't start the script with autorun. What is the problem?
Used the following commands:

Code:chmod +x /root/scripts/gccscripts.sh
systemctl enable gsscripts.service
systemctl enable gsscripts
systemctl run gsscripts.service
systemctl run gsscriptsCode:[Unit]
Description=gcc

[Service]
Type=simple
ExecStart=/root/scripts/gccscripts.sh

[Install]
WantedBy=multi-user.targetCode:#!/bin/bash

function gcc_stepik()
{
local srcname="${1}.c";
local objname1="${1}";
local objname2="${1}";
cd /root/coding/stepik/c/ && gcc "$srcname" -lm -o "$objname1" && /root/coding/stepik/c/"$objname2";
}Code:a- gccscripts.service - gcc
Loaded: loaded (/etc/systemd/system/gccscripts.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Tue 2020-03-31 06:46:56 UTC; 28min ago
Process: 1821 ExecStart=/root/scripts/gccscripts.sh (code=exited, status=0/SUCCESS)
Main PID: 1821 (code=exited, status=0/SUCCESS)

Mar 31 06:46:56 code-server systemd[1]: Started gcc.
root@code-server:~#latest?d=yIl2AUoC8zA latest?i=8BLLZjKfQUg:LIujXI2XvHE:F7zBnMy latest?i=8BLLZjKfQUg:LIujXI2XvHE:V_sGLiP latest?d=qj6IDK7rITs latest?i=8BLLZjKfQUg:LIujXI2XvHE:gIN9vFw8BLLZjKfQUg
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments