18.04e gecit

Başlatan hadjieff, 04 Nisan 2019 - 14:30:50

« önceki - sonraki »

0 Üyeler ve 1 Ziyaretçi konuyu incelemekte.

hadjieff

Selamlar. Eskiden ubuntu 12.04kullaniyordum.  /etc/init/myserver.conf normal calisiyordu. sudo service myserver start, sudo service myserver stop, sudo service myserver restart

simdi 18.04 kurdum. myserver.conf-u  /etc/init/ buraya kopyaladim. ama komutlarin hicbiri calismiyor. nerede yalnis yaptim?
# masterserver - start master server service

description "Service that starts master.sh"
author "<hadjieff>"

# When to start the service
start on runlevel [2345]

# When to stop the service
stop on runlevel [016]

# Automatically restart process if crashed
respawn

# Essentially lets upstart know the process will detach itself to the background
expect fork

# Run before process
pre-start script
    # Put bash code here if necessary
end script

# Start the process
script
    cd /home/hadjieff/hadjieff/server
    sudo java -Djava.security.policy=security.policy -Djava.rmi.server.hostname=192.168.1.91  -cp . -jar Registar.jar --xbee=true --test=false
end script

if

@hadjieff, 12.04'ten 18.04'e çok şey değişti:) init olarak artık çoğu dağıtım systemd kullanıyor. Elinizdeki betiği systemd unit'e çevirmek için biraz okumanız gerek maalesef:

https://linuxhint.com/systemd_unit_file_service/
https://linuxconfig.org/how-to-create-systemd-service-unit-in-linux
https://wiki.archlinux.org/index.php/Systemd