| Server IP : 82.148.16.210 / Your IP : 216.73.216.19 Web Server : nginx/1.29.5 System : Linux mail.sarafai.ru 6.1.0-43-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.162-1 (2026-02-08) x86_64 User : root ( 0) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/thread-self/root/proc/746/root/usr/share/gitlab-runner/ |
Upload File : |
#!/bin/sh
# Check if service management is available by testing gitlab-runner status.
# This will fail if neither systemctl nor service commands are available.
check_service_management() {
set +e
error_output=$(gitlab-runner status 2>&1)
status_exit_code=$?
set -e
# Check the error message to see if it's a service management issue
if [ $status_exit_code -eq 0 ]; then
# Command succeeded
return 0
fi
if echo "$error_output" | grep -q "executable file not found"; then
return 1
fi
# If status command works but returns non-zero (e.g., service not installed yet), that's fine
return 0
}
if ! check_service_management; then
echo "GitLab Runner: Service management is not available on this system."
echo "GitLab Runner: Skipping service stop/uninstall commands."
exit 0
fi
gitlab-runner stop >/dev/null 2>/dev/null
gitlab-runner uninstall >/dev/null 2>/dev/null
exit 0