Hi
I have read this article and it appears to me that unmasking and starting a service should also enable it back. But on trying it does not appear to happen like that
ubuntu@vrni-platform:~$ sudo systemctl status flinkjobs.service
● flinkjobs.service - Flinkjobs Service
Loaded: loaded (/usr/lib/systemd/system/flinkjobs.service; disabled; vendor preset: enabled)
Active: active (running) since Sat 2021-07-17 18:27:38 UTC; 26min ago
Main PID: 23321 (bash)
Tasks: 4 (limit: 4915)
CGroup: /system.slice/flinkjobs.service
...
● flinkjobs.service - Flinkjobs Service
Loaded: loaded (/usr/lib/systemd/system/flinkjobs.service; disabled; vendor preset: enabled)
Active: active (running) since Sat 2021-07-17 18:27:38 UTC; 26min ago
Main PID: 23321 (bash)
Tasks: 4 (limit: 4915)
CGroup: /system.slice/flinkjobs.service
...
Stopped and masked a service
ubuntu@vrni-platform:~$ sudo service flinkjobs stop
ubuntu@vrni-platform:~$ sudo systemctl mask flinkjobs.service
Created symlink /etc/systemd/system/flinkjobs.service → /dev/null.
ubuntu@vrni-platform:~$ sudo systemctl mask flinkjobs.service
Created symlink /etc/systemd/system/flinkjobs.service → /dev/null.
ubuntu@vrni-platform:~$ sudo service flinkjobs status
● flinkjobs.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead) since Sat 2021-07-17 19:00:33 UTC; 1min 54s ago
Main PID: 23321 (code=killed, signal=TERM)
● flinkjobs.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead) since Sat 2021-07-17 19:00:33 UTC; 1min 54s ago
Main PID: 23321 (code=killed, signal=TERM)
Unmasked and started a service
ubuntu@vrni-platform:~$ sudo systemctl unmask flinkjobs.service
Removed /etc/systemd/system/flinkjobs.service.
Removed /etc/systemd/system/flinkjobs.service.
ubuntu@vrni-platform:~$ sudo service flinkjobs start
ubuntu@vrni-platform:~$ sudo service flinkjobs status
● flinkjobs.service - Flinkjobs Service
Loaded: loaded (/usr/lib/systemd/system/flinkjobs.service; disabled; vendor preset: enabled)
Active: active (running) since Sat 2021-07-17 19:02:53 UTC; 10s ago
Main PID: 7958 (bash)
Tasks: 19 (limit: 4915)
CGroup: /system.slice/flinkjobs.service
ubuntu@vrni-platform:~$ sudo service flinkjobs status
● flinkjobs.service - Flinkjobs Service
Loaded: loaded (/usr/lib/systemd/system/flinkjobs.service; disabled; vendor preset: enabled)
Active: active (running) since Sat 2021-07-17 19:02:53 UTC; 10s ago
Main PID: 7958 (bash)
Tasks: 19 (limit: 4915)
CGroup: /system.slice/flinkjobs.service
...
But if I do is-enabled it is showing the service as disabled
ubuntu@vrni-platform:~$ sudo systemctl is-enabled flinkjobs.service
disabled
disabled
Should not unmasking and starting a service also make it enabled?
ubuntu@vrni-platform:~$ systemctl --version
systemd 237
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid
systemd 237
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid
Thanks,
_______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel