Cannot find the script in /etc/systemd/system

aamche

Verified User
Joined
Jul 23, 2014
Messages
9
From the show servers monitor, I am unable to stop/start/restart/reload some of the services (see below)

It maybe case of linking the correct files, interestingly apache/http works.

I've recently updated to Debian 8.5
Code:
Distributor ID:	Debian
Description:	Debian GNU/Linux 8.5 (jessie)
Release:	8.5
Codename:	jessie

And Directadmin shows
Code:
Compiled on	Debian 8.0 64-bit

Message
Code:
Cannot find the script in /etc/systemd/system or /usr/lib/systemd/system

Details

/usr/lib/systemd/system/named.service

Other ones that down't work
Code:
/usr/lib/systemd/system/directadmin.service
/usr/lib/systemd/system/exim.service
/usr/lib/systemd/system/mysqld.service
/usr/lib/systemd/system/named.service
 
If you upgraded the whole OS, please run the following commands in CustomBuild 2.0:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build all d
 
After using find, I found this file
/usr/local/directadmin/custombuild/configure/systemd/mysqld.service

I think what it maybe is that mysql is using the distro build and not the directadmin build. It's possible that other services are like this too. I probably could switch over, but I would be worried that database would be wiped as part of a re-build.
 
Last edited:
After the thread going dead, I decided to just symlink the directadmin script into the location directadmin wants it. For what ever reason debian/directadmin didn't link/copy the file to the correct place.

ln -s /usr/local/directadmin/custombuild/configure/systemd/exim.service /etc/systemd/system/exim.service
ln -s /usr/local/directadmin/custombuild/configure/systemd/named.service /etc/systemd/system/named.service


And direct admin is in a different location


ln -s /usr/local/directadmin/scripts/directadmin.service /etc/systemd/system/directadmin.service


Mysql failed start up when I did a restart, so still command prompt.
 
Last edited:
Solved

I had this problem and I solved with this: https://help.directadmin.com/item.php?id=642

Code:
[B]systemd vs init.d[/B]	Last Modified: Aug 8, 2016, 3:18 am

Newer Operating Systems like CentOS 7 and Debian 8 both support systemd, and DA is expecting that by default.

(...)

If your OS doesn't follow the expected default, [U]such as Debian 8 that uses init.d[/U], that's fine, you'd just need to set
systemd=0

in the directadmin.conf, like [B][URL="https://help.directadmin.com/item.php?id=641&in1=systemd&in2=0"]this[/URL][/B].

"this" is https://help.directadmin.com/item.php?id=641&in1=systemd&in2=0

So, I followed that tutorial and DA started to use init.d instead of systemd and now it's all working.
 
Thanks jcerveira, been trying to solve this on and off for a while and by happen chance returned to this thread.

systemd=0 was missing from my config, which is probably what you get for upgrading from debian 6 and then 7.
I ended up using systemd=1 and going with the newer debian 8 switch.

Then went on to update and update systemd. But the trick is to fix missing scripts from switching from sysvinit to systemd
 
Last edited:
Having the same problem/error right now. And MYSQL is DOWN.
Any updates on this? The systemd=1 part or =0 part doesn't work... No solution to be found online :(
 
It likely has another reason, unless your startup script is missing? What's the error?
 
If you upgraded the whole OS, please run the following commands in CustomBuild 2.0:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build all d
This worked perfectly for us after upgrading from CentOS 7 to AlmaLinux 8.4
 
Back
Top